

package com.hex.ds.code.detection.publish.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hex.ds.code.detection.common.base.PageResult;
import com.hex.ds.code.detection.publish.entity.ScriptPublishListEntity;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
 * 脚本发布清单
 *
 * @author Wang zhihao
 * @date 2023-09-13 18:17:51
 */
public interface IScriptPublishListService extends IService<ScriptPublishListEntity> {

    /**
     * @Method queryList
     * @Param
     * @param page
     * @param scriptPublishList
     * @Return com.baomidou.mybatisplus.extension.plugins.pagination.Page
     * @Description 分页查询
     * @Author Wang zhihao
     * @Date 2023/11/13 16:37
     * @Version V1.0
     */
    PageResult queryList(Page page, ScriptPublishListEntity scriptPublishList);

    /**
     * @Method queryListNoPage
     * @Param
     * @param scriptPublishList
     * @Return java.util.List<com.hex.ds.code.detection.script.publish.entity.ScriptPublishListEntity>
     * @Description 不分页查询
     * @Author Wang zhihao
     * @Date 2023/11/10 13:27
     * @Version V1.0
     */
    List<ScriptPublishListEntity> queryListNoPage(ScriptPublishListEntity scriptPublishList);

    /**
     * @Method queryBackupEarliest
     * @Param
     * @param taskId
     * @param clusterId
     * @param type
     * @Return java.util.List<com.hex.ds.code.detection.script.publish.entity.ScriptPublishListEntity>
     * @Description 获取最久的备份表信息
     * @Author Wang zhihao
     * @Date 2023/11/15 18:46
     * @Version V1.0
     */
    List<ScriptPublishListEntity> queryBackupEarliest(String taskId, String clusterId, String type);

    /**
     * @Method removeByTaskId
     * @Param
     * @param taskId
     * @Return void
     * @Description 根据任务ID删除
     * @Author Wang zhihao
     * @Date 2023/11/13 16:37
     * @Version V1.0
     */
    void removeByTaskId(String taskId);

    /**
     * @Method removeByIds
     * @Param
     * @param listIds
     * @Return void
     * @Description 根据ID批量删除
     * @Author Wang zhihao
     * @Date 2023/11/13 19:27
     * @Version V1.0
     */
    void removeByIds(List<String> listIds);

    /**
     * @Method removeById
     * @Param
     * @param listId
     * @Return void
     * @Description 根据Id删除
     * @Author Wang zhihao
     * @Date 2023/11/13 19:27
     * @Version V1.0
     */
    boolean removeById(String listId);
}
